Skip to main content

Run command with hidden console

· One min read

Run command without console / hide console window

PowerShell

powershell.exe -WindowStyle Hidden -Command "<command>"

VBS

Create a .vbs file

run.vbs
CreateObject("WScript.Shell").Exec _
("<command>")

To run .vbs file:

# Without console
wscript.exe run.vbs

# With console
cscript.exe run.vbs